<div class="cat_menu">
<?php 
	$q = Doctrine_Query::create()
    ->select('a.id, a.description')
    ->from('back_titre a')
    ->orderBy('a.ordre');
	$options = $q->execute();
//echo $q->getSql();	
?>
<ul id="menu">
  <?php	foreach($options as $menu):?>
	<li><a href="http://e-dsl/backend_dev.php/"><?php echo $menu->description;?></a>
		<ul>
			<?php $ssmenu = Doctrine_Query::create()
    			->select('u.nom_module')
			    ->from('back_modules u')
			    ->andWhere ('u.id_titre='. $menu->id)
			    ->execute();
			    
			    ?>
  			<?php	foreach($ssmenu as $sousmenu):?>
				<li><a href="<?php echo url_for($sousmenu->nom_module.'/index')?>"><?php echo $sousmenu->description;?></a></li>
 			 <?php endforeach;?>

		</ul>
	</li>	
  <?php endforeach;?>
	
</ul>	
<script type="text/javascript">
   initMenu();
</script>
   	
</div>    